﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TrafficControl
{
    public class TrafficSignal
    {
        private bool greenLightState = false;
        private bool redLightState = false;
        private bool yellowLightState = false;

        private int timeLeftOfGreenLight = 0;
        private int timeLeftOfRedLight = 0;
        private int timeLeftOfYellowLight = 0;

        public void setGreenLightState(bool state, int timeLeft) {
            this.greenLightState = state;
            this.timeLeftOfGreenLight = timeLeft;
        }

        public void setRedLightState(bool state, int timeLeft)
        {
            this.redLightState = state;
            this.timeLeftOfRedLight = timeLeft;
        }

        public void setYellowLightState(bool state, int timeLeft)
        {
            this.yellowLightState = state;
            this.timeLeftOfYellowLight = timeLeft;
        }

        public bool getStateOfGreenLight(){
            return this.greenLightState;
        }

        public bool getStateOfRedLight()
        {
            return this.redLightState;
        }

        public bool getStateOfYellowLight()
        {
            return this.yellowLightState;
        }
    }
}
